<template>
    <van-tabs v-model:active="active">
        <van-tab v-for="item in list" :key="item.id" :title="item.text">
        </van-tab>
    </van-tabs>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import axios from 'axios'

const active = ref(2)

interface INavItem {
    id:string,
    text:string
}

let  list = ref<INavItem[]>([])

axios({
    url:'/navList',
    method:'GET',
    headers:{
        
    }
}).then(res=>{
    list = res.data.result
    console.log(res.data.result);
    
})  


</script>
 